﻿using System.Drawing;

namespace ConfigMeister
{
    public class Light
    {
        private string _name;
        private Color _ambient;
        private double _multiplier;
        private double _decayInverseParam;
        private double _decayInverseSqrParam;
        private double _ambientCoef;
        private Point3 _pos;
        private Point3 _dest;
        private bool _isAmbient;
        private bool _castShadow;
        private bool _decay;
        private bool _targeted;

        public bool IsAmbient
        {
            get { return _isAmbient; }
            set { _isAmbient = value; }
        }

        public bool CastShadow
        {
            get { return _castShadow; }
            set { _castShadow = value; }
        }
        public bool Decay
        {
            get { return _decay; }
            set { _decay = value; }
        }
        public bool Targeted
        {
            get { return _targeted; }
            set { _targeted = value; }
        }

        public double DecayInverseSqrParam
        {
            get { return _decayInverseSqrParam; }
            set { _decayInverseSqrParam = value; }
        }

        public double AmbientCoef
        {
            get { return _ambientCoef; }
            set { _ambientCoef = value; }
        }

        public Point3 Pos
        {
            get { return _pos; }
            set { _pos = value; }
        }

        public Point3 Dest
        {
            get { return _dest; }
            set { _dest = value; }
        }

        public double DecayInverseParam
        {
            get { return _decayInverseParam; }
            set { _decayInverseParam = value; }
        }

        public double Multiplier
        {
            get { return _multiplier; }
            set { _multiplier = value; }
        }

        public Color Ambient
        {
            get { return _ambient; }
            set { _ambient = value; }
        }

        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        private void DefVals()
        {
            _ambient = Color.White;
            _multiplier = 1.0;
            _decayInverseParam = 1.0;
            _decayInverseSqrParam = 1.0;
            _ambientCoef = 0.5;
            _pos = new Point3(1.0, 1.0, 1.0);
            _dest = new Point3(0, 0, 0);
            _isAmbient = true;
            _targeted = false;
        }

        public Light()
        {
            DefVals();
        }

        public Light(Point3 pos)
        {
            DefVals();
            _pos = pos;
        }

    }
}
